/*
 * Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */

namespace TencentCloud.Nlp.V20190408.Models
{
    using Newtonsoft.Json;
    using System.Collections.Generic;
    using TencentCloud.Common;

    public class CorrectionItem : AbstractModel
    {
        
        /// <summary>
        /// 纠错句子的序号。
        /// </summary>
        [JsonProperty("Order")]
        public long? Order{ get; set; }

        /// <summary>
        /// 错误的起始位置，从0开始。
        /// </summary>
        [JsonProperty("BeginOffset")]
        public long? BeginOffset{ get; set; }

        /// <summary>
        /// 错误内容长度。
        /// </summary>
        [JsonProperty("Len")]
        public long? Len{ get; set; }

        /// <summary>
        /// 错误内容。
        /// </summary>
        [JsonProperty("Word")]
        public string Word{ get; set; }

        /// <summary>
        /// 纠错结果，当为删除类错误时，结果为null。
        /// 注意：此字段可能返回 null，表示取不到有效值。
        /// </summary>
        [JsonProperty("CorrectWord")]
        public string[] CorrectWord{ get; set; }

        /// <summary>
        /// 纠错类型。0：替换；1：插入；2：删除。
        /// </summary>
        [JsonProperty("CorrectionType")]
        public long? CorrectionType{ get; set; }

        /// <summary>
        /// 纠错信息置信度。0：error；1：warning；error的置信度更高。（仅供参考）
        /// </summary>
        [JsonProperty("Confidence")]
        public long? Confidence{ get; set; }

        /// <summary>
        /// 纠错信息中文描述。
        /// 注意：此字段可能返回 null，表示取不到有效值。
        /// </summary>
        [JsonProperty("DescriptionZh")]
        public string DescriptionZh{ get; set; }

        /// <summary>
        /// 纠错信息英文描述。
        /// 注意：此字段可能返回 null，表示取不到有效值。
        /// </summary>
        [JsonProperty("DescriptionEn")]
        public string DescriptionEn{ get; set; }


        /// <summary>
        /// For internal usage only. DO NOT USE IT.
        /// </summary>
        public override void ToMap(Dictionary<string, string> map, string prefix)
        {
            this.SetParamSimple(map, prefix + "Order", this.Order);
            this.SetParamSimple(map, prefix + "BeginOffset", this.BeginOffset);
            this.SetParamSimple(map, prefix + "Len", this.Len);
            this.SetParamSimple(map, prefix + "Word", this.Word);
            this.SetParamArraySimple(map, prefix + "CorrectWord.", this.CorrectWord);
            this.SetParamSimple(map, prefix + "CorrectionType", this.CorrectionType);
            this.SetParamSimple(map, prefix + "Confidence", this.Confidence);
            this.SetParamSimple(map, prefix + "DescriptionZh", this.DescriptionZh);
            this.SetParamSimple(map, prefix + "DescriptionEn", this.DescriptionEn);
        }
    }
}

